package cn.com.oceansoft.osc.ms.controller;

import cn.com.oceansoft.osc.ms.service.ITencentService;
import cn.ucox.web.framework.view.ApiResult;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

import static org.springframework.web.bind.annotation.RequestMethod.GET;
import static org.springframework.web.bind.annotation.RequestMethod.POST;

@Controller
@RequestMapping(value = "Tencent/smhs")
public class TencentController {
    @Resource
    private ITencentService iTencentService;
    @ResponseBody
    @RequestMapping(value = "version", method = GET)
    public ApiResult version()
    {
        String version="0.02";
        return  new ApiResult<Object>().success(version);
    }
    /**
     * 同步锚点监控
     * SYNC:ANCHOR
     *
     * @return
     */
    @RequestMapping(value = "YBY", method = POST)
    @ResponseBody
    public ApiResult getSyncAnchor(@RequestBody Map<String,String> map){
        return iTencentService.getImagecompare(map);
    }
}
